'use strict';
const path = require('path'),
	  Router = require('./modules/router/router.js')
exports.main = async (event, context) => {
	let router = new Router()
	router.get('/version', path.join(__dirname, './api/version.js'), false)
	router.post('/login', path.join(__dirname, './api/login.js'), false)
	router.post('/list', path.join(__dirname, './api/redis_list.js'), false)
	router.post('/set', path.join(__dirname, './api/redis_set.js'), false)
	router.post('/get', path.join(__dirname, './api/redis_get.js'), false)
	router.post('/del', path.join(__dirname, './api/redis_del.js'), false)
	const r = await router.use(event)
	console.log (JSON.stringify(r))
	return r
};